<template>
  <div style="width: 100%">
    <item-card
      v-for="(item, index) in data"
      :key="index"
      :content="item.logisticsDetails"
      :time="item.time"
      :url="item.image"
      :isComplete="item.logisticsType == 5"
      :expressInfo="item.logistics"
      :orderDetailId="item.orderDetailId"
      :commodityId="item.commodityId"
      :name="item.name"
    ></item-card>
  </div>
</template>

<script>
import ItemCardVue from "../userInfo/ItemCard.vue";
import { selectLastOrderDetail } from "@/api/orderDetail";

export default {
  components: {
    ItemCard: ItemCardVue,
  },
  data() {
    return {
      data: [],
    };
  },
  methods: {
    doSelectLastOrderDetail() {
      selectLastOrderDetail().then((res) => {
        this.data = res.list;
        console.log(this.data)
      });
    },
  },
  created() {
    this.doSelectLastOrderDetail();
  },
};
</script>